home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVTINTER.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  1KB  |  31 lines

  1. /*================================================*/
  2. /* TVTINTER.C                                     */
  3. /*                                                */
  4. /* (c) Copyright 1988 Ralf Brown                  */
  5. /*     All Rights Reserved                        */
  6. /* May be freely copied for noncommercial use,    */
  7. /* provided that this copyright notice remains    */
  8. /* intact and any changes are indicated in the    */
  9. /* comment blocks preceding functions             */
  10. /*================================================*/
  11.  
  12. #include "tvapi.h"
  13.  
  14. /*================================================*/
  15. /* TVinterrupt   software interrupt a task        */
  16. /*   Ralf Brown 4/8/88                            */
  17. /*================================================*/
  18.  
  19. void pascal TVinterrupt(OBJECT task,void far (*func)(void))
  20. {
  21.    _DX = FP_SEG(_TVinterrupt_handler) ; /* have our own routine call the */
  22.    _CX = FP_OFF(_TVinterrupt_handler) ;
  23.    _DI = FP_OFF(func) ;                /* function we want to give control */
  24.    _ES = FP_SEG(func) ;
  25.    _BX = OBJSEG(task) ;  /* object handle */
  26.    _AX = 0x1021 ;
  27.    geninterrupt(0x15) ;
  28. }
  29.  
  30. /* End of TVTINTER.C */
  31.